<%@page import="com.blockchain.common.enums.IsPass"%>
<%{%>
<%@page import="com.blockchain.front.service.trading.TradingManage"%>
<%@page import="com.blockchain.front.servlets.financial.Cjjl"%>
<%@page import="com.blockchain.front.servlets.financial.Wtjl"%>
<%@page import="com.blockchain.front.servlets.financial.XlbZc"%>
<%@page import="com.blockchain.front.servlets.financial.XlbZr"%>
<%@page import="com.blockchain.front.servlets.financial.CnyTx"%>
<%@page import="com.blockchain.front.servlets.financial.CnyCz"%>
<%@page import="com.blockchain.front.service.security.entity.QbdzEntity"%>
<%@page import="com.blockchain.front.servlets.LoginVerify"%>
<%@page import="com.blockchain.front.servlets.content.bzzx.Bzzx"%>
<%@page import="com.blockchain.front.service.common.entity.User"%>
<%@page import="com.blockchain.front.service.common.UserManage"%>
<%@page import="com.blockchain.front.servlets.Logout"%>
<%@page import="com.blockchain.front.servlets.Register"%>
<%@page import="com.blockchain.front.servlets.Index"%>
<div class="header  <%if(!CURRENT_SUB_CATEGORY.equals("SY")){%> bg_w<%}%> " id="trade_aa_header" >
    <div class="hearder_top">
        <div class="autobox po_re zin100" id="header">
            <div class="nav nav_po_1" id="menu_nav">
            	 <%
                   TradingManage scManage = serviceSession.getService(TradingManage.class);
                   QbdzEntity[] scs=scManage.getXlb();
                   %>
                <ul>
                    <li>
                        <a <%if(CURRENT_SUB_CATEGORY.equals("SY")){%> class="active"<%}%> href="<%=controller.getURI(request, Index.class)%>" id="index_box"><%=languageDefine.getValue(request, "menu_home")%></a>
                    </li>
                    <li class="nav_trade">
                        <a  <%if(CURRENT_SUB_CATEGORY.equals("JYZX")){%> class="active"<%}%>  id="trade_box" style="position: relative;z-index:11;" href="<%=controller.getPagingItemURI(request, com.blockchain.front.servlets.trading.index.class,scs.length>0?scs[0].scid:0)%>"><%=languageDefine.getValue(request, "menu_tradeCenter")%></a>
                        <div class="deal_list " style="display: none;    top: 36px;">
                            <dl id="menu_list_json">
                              
                                 <%if(scs!=null){for(QbdzEntity q:scs){ %>
                                <dd>
                                <%if(q.is_trade.getName().equals(IsPass.S.getName())){%>
                                <a href="<%=controller.getPagingItemURI(request, com.blockchain.front.servlets.trading.index.class,q.scid)%>">
                                <%}else {%>
                                <a href="#" onclick="connotTrade()">
                                <%} %>
                                <img src="<%if(!StringHelper.isEmpty(q.tblj)){%><%=fileStore.getURL(q.tblj)%><%}%>"><%StringHelper.filterHTML(out,backgroundDataFlag==2?q.ywm_s:backgroundDataFlag==3?q.zwm_f:q.zwm_s);%>(<%StringHelper.filterHTML(out,q.ywm_s);%>/<%StringHelper.filterHTML(out,q.ywm_m);%>)</a>
                                </dd>
                                  <%}}%>
                            </dl>
                            <div class="sj"></div>
                            <div class="nocontent"></div>
                        </div>
                    </li>
                    
                    <li class="nav_trade" id="news828XZ">
                        <a  <%if(CURRENT_SUB_CATEGORY.equals("JYZX")){%> class="active"<%}%>  id="trade_box1" style="position: relative;z-index:11;" href="<%=controller.getPagingItemURI(request, com.blockchain.front.servlets.trading.KlinePro.class,scs.length>0?scs[0].scid:-1)%>"><%=languageDefine.getValue(request, "menu_kLine")%></a>
                        <div class="deal_list1 " style="display: none;    top: 36px;">
                            <dl id="menu_list_json1">
                                 <%if(scs!=null){for(QbdzEntity q:scs){ %>
                                <dd>
                                <%if(q.is_trade.getName().equals(IsPass.S.getName())){%>
                                <a href="<%=controller.getPagingItemURI(request, com.blockchain.front.servlets.trading.KlinePro.class,q.scid)%>">
                                                                <%}else {%>
                                <a href="#" onclick="connotTrade()">
                                <%} %>
                                <img src="<%if(!StringHelper.isEmpty(q.tblj)){%><%=fileStore.getURL(q.tblj)%><%}%>"><%StringHelper.filterHTML(out,backgroundDataFlag==2?q.ywm_s:backgroundDataFlag==3?q.zwm_f:q.zwm_s);%>(<%StringHelper.filterHTML(out,q.ywm_s);%>/<%StringHelper.filterHTML(out,q.ywm_m);%>)</a>
                                </dd>
                                  <%}}%>
                            </dl>
                            <div class="sj"></div>
                            <div class="nocontent"></div>
                        </div>
                    </li>
                    
 				<%if (blockchainSession == null || !blockchainSession.isAuthenticated()) {%>
                    <li >
                        <a onclick="loginpop('<%=controller.getURI(request, LoginVerify.class)%>');"><%=languageDefine.getValue(request, "menu_financeCenter")%></a>
                    </li>
                    <li >
                        <a onclick="loginpop('<%=controller.getURI(request, LoginVerify.class)%>');"><%=languageDefine.getValue(request, "menu_safeCenter")%></a>
                    </li>
                    <%}else{%>
                     <li>
                        <a <%if(CURRENT_SUB_CATEGORY.equals("WDZC")){%> class="active"<%}%> id="finance_box" href="<%=controller.getViewURI(request, com.blockchain.front.servlets.financial.index.class)%>"><%=languageDefine.getValue(request, "menu_financeCenter")%></a>
                    </li>
                    <li>
                        <a <%if(CURRENT_SUB_CATEGORY.equals("AQZX")){%> class="active"<%}%>  href="<%=controller.getViewURI(request, com.blockchain.front.servlets.security.index.class)%>"><%=languageDefine.getValue(request, "menu_safeCenter")%></a>
                    </li>
                    <%}%>
                    <li>
                        <a  <%if(CURRENT_SUB_CATEGORY.equals("BZZC")){%> class="active"<%}%>  id="bzzx_box" href="<%=controller.getViewURI(request, Bzzx.class)%>"><%=languageDefine.getValue(request, "menu_helpCenter")%></a>
                    </li>
                    <%if (blockchainSession == null || !blockchainSession.isAuthenticated()) {%>
                    <li id="register_btn">
                        <a href="<%=controller.getURI(request,Register.class)%>"><%=languageDefine.getValue(request, "menu_register")%></a>
                    </li>
                    <li id="login_btn">
                        <a href="javascript:void" onclick='loginpop("<%=controller.getURI(request, LoginVerify.class)%>");'><%=languageDefine.getValue(request, "menu_login")%></a>
                    </li>
                    <%}else{
                    	UserManage userManage = serviceSession.getService(UserManage.class);
                    	User u=userManage.getUserBtc();%>
                     <%-- <li>
                        <dl class="mywallet">
                            <dt id="user-finance">
                                <div class="mywallet_name clear">
                                    <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.financial.index.class)%>"><%StringHelper.truncationMpno(out, u.iphone);%></a><i></i>
                                </div>
                               <div class="mywallet_list" style="display: none;">
                                    <div class="clear">
                                        <ul class="balance_list">
                                            <h4><%=languageDefine.getValue(request, "account_balance")%></h4>
                                            <li>
                                                <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.security.index.class)%>"><em style="margin-top: 5px;" class="deal_list_pic_btc"></em><strong>BTC：</strong><span><%=Formater.formatAmount_(u.kyje,4)%></span></a>
                                            </li>
                                        </ul>
                                        <ul class="freeze_list">
                                            <h4><%=languageDefine.getValue(request, "account_entrustFrozen")%></h4>
                                            <li>
                                                <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.financial.index.class)%>"><em style="margin-top: 5px;" class="deal_list_pic_btc"></em><strong>BTC：</strong><span><%=Formater.formatAmount_(u.djje,4)%></span></a>
                                            </li>
                                        </ul>
                                    </div>
                                    <div class="mywallet_btn_box">
                                        <a  href="<%=controller.getViewURI(request, CnyCz.class)%>"><%=languageDefine.getValue(request, "account_recharge")%></a>
                                        <a  href="<%=controller.getViewURI(request, CnyTx.class)%>"><%=languageDefine.getValue(request, "account_withdraw")%></a>
                                        <a  href="<%=controller.getViewURI(request, XlbZr.class)%>"><%=languageDefine.getValue(request, "account_turnIn")%></a>
                                        <a  href="<%=controller.getViewURI(request, XlbZc.class)%>"><%=languageDefine.getValue(request, "account_turnOut")%></a>
                                        <a  href="<%=controller.getViewURI(request, Wtjl.class)%>"><%=languageDefine.getValue(request, "account_entrustManage")%></a>
                                        <a  href="<%=controller.getViewURI(request, Cjjl.class)%>"><%=languageDefine.getValue(request, "account_dealQuery")%></a>
                                        <a href="<%=controller.getURI(request, Logout.class)%>"><%=languageDefine.getValue(request, "account_quit")%></a>
                                    </div>
                                </div> 
                            </dt>
                        </dl></li>--%>
                     <li>
                         <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.financial.index.class)%>"><%StringHelper.truncationMpno(out, u.iphone);%></a>
                   	 </li>
                     <li>
                         <a href="<%=controller.getURI(request, Logout.class)%>"><%=languageDefine.getValue(request, "account_quit")%></a>
                   	 </li>
                        
                        <%}%>
                        
                        <li class="nav_trade">
                        <a id="lang_box" href="javascript:void(0)"><%=languageDefine.getValue(request, "menu_lang")%></a>
                        <div class="lang_list " style="display: none;top: 36px;">
                            <dl id="menu_list_json">
                            	<dd>
                                	<a href="#" onclick="changeLang('en-US');">English</a>
                                </dd>
                                <dd>
                                	<a href="#" onclick="changeLang('zh-CN');">中文简体</a>
                                </dd>
                                <!-- <dd>
                                	<a href="#" onclick="changeLang('zh-TW');">中文繁体</a>
                                </dd> -->
                                
                            </dl>
                            <div class="sj"></div>
                            <div class="nocontent"></div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="autobox clear" id="trade_clear">
        <div class="logo">
            <a href="<%=controller.getURI(request, Index.class)%>"><img width="130" src="<%=controller.getStaticPath(request)%>/images/logo<%=backgroundDataFlag==1?"":backgroundDataFlag==2?"En":"Tw"%>.png" alt=""/></a>
        </div>
    </div>
</div>
<%}%>

<script type="text/javascript">

function connotTrade(){
	layer.open({  
        content: '<%=languageDefine.getValue(request, "js_nottrade")%>',  
        btn: ['<%=languageDefine.getValue(request, "js_confirm")%>'],  
        
    }); 
}
</script>